﻿using System;
using System.Collections.Generic;
using System.IO;
using Character;
using H;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

// Token: 0x020002BA RID: 698
public class H_Scene : Scene
{
	// Token: 0x170001AB RID: 427
	// (get) Token: 0x0600119E RID: 4510 RVA: 0x0007204C File Offset: 0x0007024C
	public HStyleChangeUI StyleChangeUI
	{
		get
		{
			return this.styleChangeUI;
		}
	}

	// Token: 0x170001AC RID: 428
	// (get) Token: 0x0600119F RID: 4511 RVA: 0x00072054 File Offset: 0x00070254
	public H_CharaMoveController CharaMove
	{
		get
		{
			return this.charaMove;
		}
	}

	// Token: 0x170001AD RID: 429
	// (get) Token: 0x060011A0 RID: 4512 RVA: 0x0007205C File Offset: 0x0007025C
	// (set) Token: 0x060011A1 RID: 4513 RVA: 0x00072064 File Offset: 0x00070264
	public bool ExitEnable { get; set; }

	// Token: 0x170001AE RID: 430
	// (get) Token: 0x060011A2 RID: 4514 RVA: 0x00072070 File Offset: 0x00070270
	public H_Members mainMembers
	{
		get
		{
			return (this.mainMembersNo == -1) ? null : this.members[this.mainMembersNo];
		}
	}

	// Token: 0x170001AF RID: 431
	// (get) Token: 0x060011A3 RID: 4515 RVA: 0x00072098 File Offset: 0x00070298
	public IllusionCamera IllCam
	{
		get
		{
			return this.camera;
		}
	}

	// Token: 0x170001B0 RID: 432
	// (get) Token: 0x060011A4 RID: 4516 RVA: 0x000720A0 File Offset: 0x000702A0
	// (set) Token: 0x060011A5 RID: 4517 RVA: 0x000720A8 File Offset: 0x000702A8
	public Map map { get; private set; }

	// Token: 0x170001B1 RID: 433
	// (get) Token: 0x060011A6 RID: 4518 RVA: 0x000720B4 File Offset: 0x000702B4
	// (set) Token: 0x060011A7 RID: 4519 RVA: 0x000720BC File Offset: 0x000702BC
	public MapMob mob { get; private set; }

	// Token: 0x170001B2 RID: 434
	// (get) Token: 0x060011A8 RID: 4520 RVA: 0x000720C8 File Offset: 0x000702C8
	// (set) Token: 0x060011A9 RID: 4521 RVA: 0x000720D0 File Offset: 0x000702D0
	public bool IsEvent { get; private set; }

	// Token: 0x170001B3 RID: 435
	// (get) Token: 0x060011AA RID: 4522 RVA: 0x000720DC File Offset: 0x000702DC
	// (set) Token: 0x060011AB RID: 4523 RVA: 0x000720E4 File Offset: 0x000702E4
	public bool ExitStandBy { get; private set; }

	// Token: 0x060011AC RID: 4524 RVA: 0x000720F0 File Offset: 0x000702F0
	private void Awake()
	{
		base.InScene(true);
		this.config = UnityEngine.Object.Instantiate<Config>(this.configOriginal);
		this.config.gameObject.SetActive(false);
		this.pauseMenue = UnityEngine.Object.Instantiate<PauseMenue>(this.pauseMenueOriginal);
		this.pauseMenue.Setup(true, true, new Action(this.OpenConfig), null, null);
		this.AnalyzeMsg();
		this.ExitEnable = (this.sceneInMsg.Length == 0);
		this.buttonExit.interactable = this.ExitEnable;
		HEROINE lastSelectFemale = GlobalData.PlayData.lastSelectFemale;
		Personality heroinePersonality = GlobalData.PlayData.GetHeroinePersonality(lastSelectFemale);
		if (this.sceneInMsg == null || this.sceneInMsg.Length == 0)
		{
			if (!Personality.IsFloped(heroinePersonality.state, lastSelectFemale))
			{
				string[] array = new string[]
				{
					"12",
					"13",
					"14"
				};
				int num = UnityEngine.Random.Range(0, array.Length);
				this.gameCtrl.audioCtrl.BGM_LoadAndPlay(array[num], false, false);
			}
			else
			{
				string[] array2 = new string[]
				{
					"11",
					"15",
					"16"
				};
				int num2 = UnityEngine.Random.Range(0, array2.Length);
				this.gameCtrl.audioCtrl.BGM_LoadAndPlay(array2[num2], false, false);
			}
		}
		this.camera = UnityEngine.Object.FindObjectOfType<IllusionCamera>();
		this.LoadStyles();
		this.maleShowChangeUI.Setup(this);
		this.expression = base.GetComponent<H_Expression>();
		this.expression.Setup();
		this.expression_M = base.GetComponent<H_Expression_Male>();
		this.expression_M.Setup();
		this.voice = base.GetComponent<H_Voice>();
		this.voice.Setup();
		this.visitorVoice = base.GetComponent<H_VisitorVoice>();
		this.visitorVoice.Setup();
		this.visitorExpression = base.GetComponent<H_VisitorExpression>();
		this.visitorExpression.Setup();
		this.voiceABC[0] = new AssetBundleController();
		this.voiceABC[0].OpenFromFile(GlobalData.assetBundlePath, "h_voice_ritsuko");
		this.voiceABC[1] = new AssetBundleController();
		this.voiceABC[1].OpenFromFile(GlobalData.assetBundlePath, "h_voice_akiko");
		this.voiceABC[2] = new AssetBundleController();
		this.voiceABC[2].OpenFromFile(GlobalData.assetBundlePath, "h_voice_yukiko");
		this.voiceABC[3] = new AssetBundleController();
		this.voiceABC[3].OpenFromFile(GlobalData.assetBundlePath, "h_voice_mariko");
		this.LoadMap(false);
		H_Members h_Members = new H_Members(this);
		this.members.Add(h_Members);
		Female female = h_Members.AddFemale(lastSelectFemale);
		Male male = h_Members.AddMale(GlobalData.PlayData.lastSelectMale);
		this.mainMembersNo = 0;
		H_Scene.SetInput(h_Members, this.MixCtrl);
		this.badgeFeelVagina.SetActive(female.personality.feelVagina);
		this.badgeFeelAnus.SetActive(female.personality.feelAnus);
		this.badgeIndecentLanguage.SetActive(female.personality.indecentLanguage);
		this.badgeLikeFeratio.SetActive(female.personality.likeFeratio);
		this.badgeLikeSperm.SetActive(female.personality.likeSperm);
		AssetBundleController assetBundleController = new AssetBundleController(false);
		assetBundleController.OpenFromFile(GlobalData.assetBundlePath, "h/h_in");
		this.LoadPoses(assetBundleController);
		assetBundleController.Close(false);
		int lastSelectVisitor = (int)GlobalData.PlayData.lastSelectVisitor;
		bool flag = false;
		if (lastSelectVisitor >= 0 && lastSelectVisitor < 4)
		{
			assetBundleController.OpenFromFile(GlobalData.assetBundlePath, "h/h_visitor");
			this.LoadVisitorPoses(assetBundleController);
			HEROINE lastSelectVisitor2 = (HEROINE)GlobalData.PlayData.lastSelectVisitor;
			CustomParameter heroineCustomParam = GlobalData.PlayData.GetHeroineCustomParam(lastSelectVisitor2);
			RuntimeAnimatorController runtimeAC = assetBundleController.LoadAsset<RuntimeAnimatorController>("AC_Visitor");
			this.visitor = new H_Visitor(this, lastSelectVisitor2, heroineCustomParam, runtimeAC, this.visitorVoice, this.visitorExpression);
			assetBundleController.Close(false);
			flag = true;
		}
		else if (GlobalData.PlayData.lastSelectVisitor == VISITOR.KOUICHI)
		{
			assetBundleController.OpenFromFile(GlobalData.assetBundlePath, "h/h_visitor");
			this.LoadVisitorPoses(assetBundleController);
			CustomParameter maleCustomParam = GlobalData.PlayData.GetMaleCustomParam(MALE_ID.KOUICHI);
			RuntimeAnimatorController runtimeAC2 = assetBundleController.LoadAsset<RuntimeAnimatorController>("AC_Visitor_M");
			this.visitor = new H_Visitor(this, MALE_ID.KOUICHI, maleCustomParam, runtimeAC2);
			assetBundleController.Close(false);
			flag = true;
		}
		H_Scene.SetupEventCharacters(this.sceneInMsg, h_Members, this.visitor);
		this.swapUIRoot.gameObject.SetActive(flag);
		this.styleChangeUI.Setup(this, this.styleDatas);
		this.gagUI.Setup(this);
		this.SetMainFemaleName();
		h_Members.ChangeMap(this.map.data, false);
		this.charaMove.Setup(this);
		this.wearAcceChangeUI.Setup(this);
		this.UpdateMaleShowUI();
		this.editFemale.onClick.AddListener(new UnityAction(this.CharaCustom_Female));
		this.editMale.onClick.AddListener(delegate()
		{
			this.CharaCustom_Male(0);
		});
		this.editVisitor.onClick.AddListener(new UnityAction(this.CharaCustom_Visitor));
		this.editMaleMobA.onClick.AddListener(delegate()
		{
			this.CharaCustom_Male(1);
		});
		this.editMaleMobB.onClick.AddListener(delegate()
		{
			this.CharaCustom_Male(2);
		});
		this.editMaleMobC.onClick.AddListener(delegate()
		{
			this.CharaCustom_Male(3);
		});
		this.editVisitor.gameObject.SetActive(flag);
		this.editFemale.GetComponentInChildren<Text>().text = Female.HeroineName(h_Members.GetFemale(0).HeroineID);
		this.editMale.GetComponentInChildren<Text>().text = Male.MaleName(h_Members.GetMale(0).MaleID);
		if (flag)
		{
			Female female2 = this.visitor.GetHuman() as Female;
			if (female2 != null)
			{
				this.editVisitor.GetComponentInChildren<Text>().text = Female.HeroineName(female2.HeroineID);
			}
		}
		H_Pos h_pos = this.StartPose(0);
		int posNo = (this.sceneInMsg.Length <= 0) ? -1 : 0;
		this.VisitorPos(h_pos, posNo);
		if (this.IsEvent)
		{
			this.mapToggleButton.Interactable = false;
			this.moveToggleButton.Interactable = false;
		}
	}

	// Token: 0x060011AD RID: 4525 RVA: 0x00072754 File Offset: 0x00070954
	private void UpdateMaleShowUI()
	{
		this.maleShowChangeUI.SetMales(this.mainMembers.GetMales());
	}

	// Token: 0x060011AE RID: 4526 RVA: 0x0007276C File Offset: 0x0007096C
	private void AnalyzeMsg()
	{
		if (this.sceneInMsg == null || this.sceneInMsg.Length == 0)
		{
			return;
		}
		if (this.sceneInMsg == "RitsukoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FIRST_RITSUKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.RITSUKO).state = Personality.STATE.FIRST;
			GlobalData.PlayData.lastSelectFemale = HEROINE.RITSUKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.NONE;
			GlobalData.PlayData.lastSelectMap = 1;
			GlobalData.PlayData.lastSelectTimeZone = 1;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("12", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "AkikoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FIRST_AKIKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.AKIKO).state = Personality.STATE.FIRST;
			GlobalData.PlayData.lastSelectFemale = HEROINE.AKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.RITSUKO;
			GlobalData.PlayData.lastSelectMap = 2;
			GlobalData.PlayData.lastSelectTimeZone = 1;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("13", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "YukikoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FIRST_YUKIKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.YUKIKO).state = Personality.STATE.FIRST;
			GlobalData.PlayData.lastSelectFemale = HEROINE.YUKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.NONE;
			GlobalData.PlayData.lastSelectMap = 3;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("14", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "YukikoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLIPFLOP_YUKIKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.YUKIKO).state = Personality.STATE.FLIP_FLOP;
			GlobalData.PlayData.lastSelectFemale = HEROINE.YUKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.NONE;
			GlobalData.PlayData.lastSelectMap = 0;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("11", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "AkikoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLIPFLOP_AKIKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.AKIKO).state = Personality.STATE.FLIP_FLOP;
			GlobalData.PlayData.lastSelectFemale = HEROINE.AKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.YUKIKO;
			GlobalData.PlayData.lastSelectMap = 0;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("11", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "RitsukoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLIPFLOP_RITSUKO;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.RITSUKO).state = Personality.STATE.FLIP_FLOP;
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.AKIKO).state = Personality.STATE.FLOP;
			GlobalData.PlayData.lastSelectFemale = HEROINE.RITSUKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.AKIKO;
			GlobalData.PlayData.lastSelectMap = 1;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("11", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "FinalYukikoH1")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.END_YUKIKO_1;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.YUKIKO).state = Personality.STATE.LAST_EVENT_YUKIKO_1;
			GlobalData.PlayData.lastSelectFemale = HEROINE.YUKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.HERO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.KOUICHI;
			GlobalData.PlayData.lastSelectMap = 3;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("11", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "FinalSistersH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.END_SISTERS;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.RITSUKO).state = Personality.STATE.LAST_EVENT_SISTERS;
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.AKIKO).state = Personality.STATE.LAST_EVENT_SISTERS;
			GlobalData.PlayData.lastSelectFemale = HEROINE.RITSUKO;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.AKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.KOUICHI;
			GlobalData.PlayData.lastSelectMap = 3;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("15", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "FinalYukikoH2")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.END_YUKIKO_2;
			}
			GlobalData.PlayData.GetHeroinePersonality(HEROINE.YUKIKO).state = Personality.STATE.LAST_EVENT_YUKIKO_2;
			GlobalData.PlayData.lastSelectFemale = HEROINE.YUKIKO;
			GlobalData.PlayData.lastSelectMale = MALE_ID.KOUICHI;
			GlobalData.PlayData.lastSelectVisitor = VISITOR.NONE;
			GlobalData.PlayData.lastSelectMap = 3;
			GlobalData.PlayData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("15", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "MarikoFirstH")
		{
			GamePlayData playData = GlobalData.PlayData;
			if (!GlobalData.isMemory)
			{
				playData.Progress = GamePlayData.PROGRESS.FIRST_MARIKO;
			}
			playData.GetHeroinePersonality(HEROINE.MARIKO).state = Personality.STATE.FIRST;
			playData.lastSelectFemale = HEROINE.MARIKO;
			playData.lastSelectMale = MALE_ID.HERO;
			playData.lastSelectVisitor = VISITOR.NONE;
			playData.lastSelectMap = 10;
			playData.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("12", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "MarikoFlipFlopH")
		{
			GamePlayData playData2 = GlobalData.PlayData;
			if (!GlobalData.isMemory)
			{
				playData2.Progress = GamePlayData.PROGRESS.FLIPFLOP_MARIKO;
			}
			playData2.GetHeroinePersonality(HEROINE.MARIKO).state = Personality.STATE.FLIP_FLOP;
			playData2.lastSelectFemale = HEROINE.MARIKO;
			playData2.lastSelectMale = MALE_ID.HERO;
			playData2.lastSelectVisitor = VISITOR.NONE;
			playData2.lastSelectMap = 13;
			playData2.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("11", false, false);
			this.IsEvent = true;
		}
		else if (this.sceneInMsg == "FinalMarikoH")
		{
			GamePlayData playData3 = GlobalData.PlayData;
			if (!GlobalData.isMemory)
			{
				playData3.Progress = GamePlayData.PROGRESS.END_MARIKO;
			}
			playData3.GetHeroinePersonality(HEROINE.MARIKO).state = Personality.STATE.LAST_EVENT_MARIKO;
			playData3.lastSelectFemale = HEROINE.MARIKO;
			playData3.lastSelectMale = MALE_ID.MOB_C;
			playData3.lastSelectVisitor = VISITOR.NONE;
			playData3.lastSelectMap = 12;
			playData3.lastSelectTimeZone = 2;
			this.gameCtrl.audioCtrl.BGM_LoadAndPlay("15", false, false);
			this.IsEvent = true;
		}
	}

	// Token: 0x060011AF RID: 4527 RVA: 0x00072E78 File Offset: 0x00071078
	private static void SetupEventCharacters(string msg, H_Members members, H_Visitor visitor)
	{
		if (msg == "AkikoFirstH")
		{
			Female female = visitor.GetFemale();
			female.ChangeRestrict(true);
			female.personality.gagItem = GAG_ITEM.GUMTAPE;
			female.ChangeGagItem();
			female.transform.position = new Vector3(0.8f, 0.4f, 2.1f);
			female.transform.rotation = Quaternion.Euler(0f, -90f, 0f);
			female.body.Anime.Play("RitsukoFirst");
			visitor.LockPos = true;
			H_Scene.SetupEventCharacters_UnderWear(female);
		}
		else if (msg == "YukikoFlipFlopH")
		{
			H_Scene.SetupEventCharacters_UnderWear(members.GetFemale(0));
		}
		else if (msg == "AkikoFlipFlopH")
		{
			Female female2 = visitor.GetFemale();
			H_Scene.SetupEventCharacters_UnderWear(female2);
		}
		else if (msg == "RitsukoFlipFlopH")
		{
			Female female3 = visitor.GetFemale();
			H_Scene.SetupEventCharacters_UnderWear(female3);
		}
		else if (msg == "FinalYukikoH1")
		{
			H_Scene.SetupEventCharacters_Nude(members.GetFemale(0));
			Human human = visitor.GetHuman();
			human.ChangeRestrict(true);
			human.transform.position = new Vector3(-0.18f, 0f, 4.3f);
			human.transform.rotation = Quaternion.Euler(0f, -90f, 0f);
			visitor.LockPos = true;
		}
		else if (msg == "FinalSistersH")
		{
			H_Scene.SetupEventCharacters_Nude(members.GetFemale(0));
			H_Scene.SetupEventCharacters_Nude(visitor.GetFemale());
			members.GetMale(0).ChangeRestrict(true);
		}
		else if (msg == "FinalYukikoH2")
		{
			H_Scene.SetupEventCharacters_Nude(members.GetFemale(0));
			members.GetMale(0).ChangeRestrict(true);
		}
		else if (msg == "MarikoFirstH")
		{
			members.AddMale(MALE_ID.MOB_A);
			members.AddMale(MALE_ID.MOB_B);
		}
		else if (msg == "MarikoFlipFlopH")
		{
			H_Scene.SetupEventCharacters_UnderWear(members.GetFemale(0));
		}
		else if (msg == "FinalMarikoH")
		{
			H_Scene.SetupEventCharacters_Nude(members.GetFemale(0));
		}
	}

	// Token: 0x060011B0 RID: 4528 RVA: 0x000730BC File Offset: 0x000712BC
	private static void SetupEventCharacters_UnderWear(Female female)
	{
		female.wears.ChangeShow(WEAR_SHOW_TYPE.TOPUPPER, WEAR_SHOW.HIDE);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.TOPLOWER, WEAR_SHOW.HIDE);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.BOTTOM, WEAR_SHOW.HIDE);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.BRA, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SHORTS, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIMUPPER, WEAR_SHOW.HIDE);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIMLOWER, WEAR_SHOW.HIDE);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_TOPUPPER, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_TOPLOWER, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_BOTTOM, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.GLOVE, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.PANST, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SOCKS, WEAR_SHOW.ALL);
		female.wears.ChangeShow(WEAR_SHOW_TYPE.SHOES, WEAR_SHOW.HIDE);
		female.CheckShow();
	}

	// Token: 0x060011B1 RID: 4529 RVA: 0x0007318C File Offset: 0x0007138C
	private static void SetupEventCharacters_Nude(Female female)
	{
		for (int i = 0; i < 14; i++)
		{
			female.wears.ChangeShow((WEAR_SHOW_TYPE)i, WEAR_SHOW.HIDE);
		}
		female.CheckShow();
	}

	// Token: 0x060011B2 RID: 4530 RVA: 0x000731C0 File Offset: 0x000713C0
	private void LoadCameraDataList(string map_name)
	{
		this.cameraDatas.Clear();
		string assetName = "H_Camera_" + map_name;
		string assetBundleName = "h/h_camera";
		TextAsset textAsset = AssetBundleLoader.LoadAsset<TextAsset>(GlobalData.assetBundlePath, assetBundleName, assetName);
		if (textAsset == null)
		{
			return;
		}
		ListDataLoader listDataLoader = new ListDataLoader('\t', StringSplitOptions.None);
		listDataLoader.Load_Text(textAsset, -1, -1);
		for (int i = 0; i < listDataLoader.Y_Num; i++)
		{
			string text = listDataLoader.Get(0, i);
			if (text.Length > 0)
			{
				IllusionCameraResetData value = this.LoadCameraData(listDataLoader, i);
				if (this.cameraDatas.ContainsKey(text))
				{
					GlobalData.Debug_LogError("重复键: " + text);
				}
				else
				{
					this.cameraDatas.Add(text, value);
				}
			}
		}
	}

	// Token: 0x060011B3 RID: 4531 RVA: 0x0007328C File Offset: 0x0007148C
	private IllusionCameraResetData LoadCameraData(ListDataLoader loader, int y)
	{
		IllusionCameraResetData illusionCameraResetData = new IllusionCameraResetData();
		illusionCameraResetData.pos.x = loader.GetFloat(1, y);
		illusionCameraResetData.pos.y = loader.GetFloat(2, y);
		illusionCameraResetData.pos.z = loader.GetFloat(3, y);
		illusionCameraResetData.eul.x = loader.GetFloat(4, y);
		illusionCameraResetData.eul.y = loader.GetFloat(5, y);
		illusionCameraResetData.eul.z = loader.GetFloat(6, y);
		illusionCameraResetData.dis = loader.GetFloat(7, y);
		return illusionCameraResetData;
	}

	// Token: 0x060011B4 RID: 4532 RVA: 0x00073320 File Offset: 0x00071520
	public IllusionCameraResetData GetCameraReset(string id)
	{
		if (this.cameraDatas.ContainsKey(id))
		{
			return this.cameraDatas[id];
		}
		return null;
	}

	// Token: 0x060011B5 RID: 4533 RVA: 0x00073344 File Offset: 0x00071544
	private void OnDestroy()
	{
		for (int i = 0; i < this.voiceABC.Length; i++)
		{
			if (this.voiceABC[i] != null)
			{
				this.voiceABC[i].Close(false);
			}
		}
	}

	// Token: 0x060011B6 RID: 4534 RVA: 0x00073388 File Offset: 0x00071588
	public void ChangeMap(int no)
	{
		if (GlobalData.PlayData.lastSelectMap != no)
		{
			GlobalData.PlayData.lastSelectMap = no;
			this.LoadMap(false);
		}
	}

	// Token: 0x060011B7 RID: 4535 RVA: 0x000733AC File Offset: 0x000715AC
	public void LoadMap(bool changeTimeOnly)
	{
		IllusionCameraResetData illusionCameraResetData = this.CalcRelativeCamera();
		if (this.map != null)
		{
			UnityEngine.Object.Destroy(this.map.gameObject);
			this.map = null;
		}
		if (this.mob != null)
		{
			UnityEngine.Object.Destroy(this.mob.gameObject);
			this.mob = null;
		}
		string[] array = new string[]
		{
			"day",
			"evening",
			"night_light",
			"night_dark"
		};
		string assetBundleName = GlobalData.GetMapAssetBundleName(GlobalData.PlayData.lastSelectMap) + "_" + array[GlobalData.PlayData.lastSelectTimeZone];
		AssetBundleController assetBundleController = new AssetBundleController();
		assetBundleController.OpenFromFile(GlobalData.assetBundlePath, assetBundleName);
		string assetName = GlobalData.GetMapAssetName(GlobalData.PlayData.lastSelectMap) + "_" + array[GlobalData.PlayData.lastSelectTimeZone];
		GameObject gameObject = assetBundleController.LoadAndInstantiate<GameObject>(assetName);
		this.map = gameObject.GetComponent<Map>();
		LightMapControl componentInChildren = this.map.GetComponentInChildren<LightMapControl>();
		componentInChildren.Apply();
		if (this.map.data.mob.Length > 0)
		{
			GameObject gameObject2 = assetBundleController.LoadAndInstantiate<GameObject>(this.map.data.mob);
			if (gameObject2 != null)
			{
				this.mob = gameObject2.GetComponent<MapMob>();
				this.mob.gameObject.SetActive(ConfigData.showMob);
			}
		}
		assetBundleController.Close(false);
		Resources.UnloadUnusedAssets();
		this.light.SetupLight(this.map.lightRoot, false);
		this.h_light.ChangeMap(GlobalData.GetMapAssetName(GlobalData.PlayData.lastSelectMap));
		bool flag = false;
		for (int i = 0; i < this.members.Count; i++)
		{
			bool flag2 = this.members[i].ChangeMap(this.map.data, changeTimeOnly);
			if (i == this.mainMembersNo)
			{
				flag = flag2;
			}
		}
		if (this.visitor != null)
		{
			this.visitor.Foot(this.map.data.foot);
			if (!changeTimeOnly)
			{
				int num;
				H_Pos h_pos;
				this.mainMembers.GetNowDataPosNo(out num, out h_pos);
				this.VisitorPos(h_pos, -1);
			}
		}
		this.LoadCameraDataList(GlobalData.GetMapAssetName(GlobalData.PlayData.lastSelectMap));
		if (this.mainMembers != null)
		{
			string id = string.Empty;
			if (this.mainMembers.StyleData != null)
			{
				id = this.mainMembers.StyleData.id;
			}
			else if (this.mainMembers.PoseData != null)
			{
				id = this.mainMembers.PoseData.id;
			}
			this.cameraReset = this.GetCameraReset(id);
			IllusionCameraResetData illusionCameraResetData2 = illusionCameraResetData;
			if (ConfigData.h_camReset_style && flag)
			{
				if (this.cameraReset != null)
				{
					illusionCameraResetData2 = this.cameraReset;
				}
			}
			else if (ConfigData.h_camReset_position && !changeTimeOnly && this.cameraReset != null)
			{
				illusionCameraResetData2 = this.cameraReset;
			}
			if (illusionCameraResetData2 != null)
			{
				illusionCameraResetData2.ResetCamera(this.camera, this.mainMembers.Transform);
			}
		}
	}

	// Token: 0x060011B8 RID: 4536 RVA: 0x000736E8 File Offset: 0x000718E8
	private H_Pos StartPose(int memberNo)
	{
		H_Members h_Members = this.members[memberNo];
		Female female = h_Members.GetFemale(0);
		string[] array = new string[]
		{
			"Ritsuko",
			"Akiko",
			"Yukiko",
			"Mariko"
		};
		string str = array[(int)GlobalData.PlayData.lastSelectFemale];
		string text = string.Empty;
		H_Pos h_Pos = null;
		int num = -1;
		if (female.personality.state == Personality.STATE.FIRST)
		{
			text = str + "FirstH";
			H_PoseData pose = this.poseDatas[text];
			if (female.HeroineID == HEROINE.AKIKO)
			{
				num = 1;
				h_Members.floorPosNo = num;
			}
			else if (female.HeroineID == HEROINE.MARIKO)
			{
				num = 0;
				h_Members.specialPosNo = num;
			}
			else
			{
				num = 0;
			}
			h_Pos = this.GetPosePosList(pose)[num];
		}
		else if (female.personality.state == Personality.STATE.FLIP_FLOP)
		{
			text = str + "FlipFlop";
			H_PoseData pose2 = this.poseDatas[text];
			h_Pos = this.GetPosePosList(pose2)[0];
			num = 0;
		}
		else if (female.personality.state == Personality.STATE.LAST_EVENT_YUKIKO_1)
		{
			text = "FinalYukiko1";
			H_PoseData pose3 = this.poseDatas[text];
			h_Pos = this.GetPosePosList(pose3)[0];
			num = 0;
		}
		else if (female.personality.state == Personality.STATE.LAST_EVENT_SISTERS)
		{
			text = "FinalSisters";
			num = 2;
			h_Members.chairPosNo = num;
			H_PoseData pose4 = this.poseDatas[text];
			h_Pos = this.GetPosePosList(pose4)[num];
		}
		else if (female.personality.state == Personality.STATE.LAST_EVENT_YUKIKO_2)
		{
			text = "FinalYukiko2";
			num = 1;
			h_Members.floorPosNo = num;
			H_PoseData pose5 = this.poseDatas[text];
			h_Pos = this.GetPosePosList(pose5)[num];
		}
		else if (female.personality.state == Personality.STATE.LAST_EVENT_MARIKO)
		{
			text = "FinalMariko";
			num = 0;
			h_Members.specialPosNo = num;
			H_PoseData pose6 = this.poseDatas[text];
			h_Pos = this.GetPosePosList(pose6)[num];
		}
		else
		{
			if (!this.StartPose_CheckExcite(h_Members, female, ref h_Pos, ref text))
			{
				int num2 = UnityEngine.Random.Range(0, 3);
				string[] array2 = new string[]
				{
					"Lie",
					"Stand",
					"Chair"
				};
				HEROINE lastSelectFemale = GlobalData.PlayData.lastSelectFemale;
				string str2 = (!GlobalData.PlayData.IsHeroineFloped(lastSelectFemale)) ? "Resist" : "Flip";
				text = str + array2[num2] + str2;
			}
			if (this.poseDatas.ContainsKey(text))
			{
				H_PoseData data = this.poseDatas[text];
				this.StartPosePos(data, ref h_Members, ref h_Pos, ref num);
			}
			else
			{
				GlobalData.Debug_LogError("不明确的开始姿势:" + text);
			}
		}
		h_Members.Transform.position = h_Pos.pos.pos;
		h_Members.Transform.rotation = Quaternion.Euler(0f, h_Pos.pos.yaw, 0f);
		this.charaMove.SetDef(h_Members.Transform.position, h_Members.Transform.rotation);
		this.StartPose(memberNo, text);
		this.SetH_Light(num);
		return h_Pos;
	}

	// Token: 0x060011B9 RID: 4537 RVA: 0x00073A58 File Offset: 0x00071C58
	private bool StartPose_CheckExcite(H_Members memberSet, Female female, ref H_Pos startPos, ref string startPose)
	{
		if (female.personality.state != Personality.STATE.FLOP)
		{
			return false;
		}
		if (UnityEngine.Random.Range(0, 3) != 0)
		{
			return false;
		}
		int num = UnityEngine.Random.Range(0, 3);
		string[] array = new string[]
		{
			"A",
			"B",
			"C"
		};
		if (num == 0 && female.personality.feelVagina)
		{
			int num2 = UnityEngine.Random.Range(0, 3);
			startPose = "Excite_Vagina" + array[num2];
			if (female.customParam.wear.isSwimwear)
			{
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIMLOWER, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_TOPLOWER, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_BOTTOM, WEAR_SHOW.HALF);
			}
			else
			{
				female.wears.ChangeShow(WEAR_SHOW_TYPE.BOTTOM, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.PANST, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SHORTS, WEAR_SHOW.HALF);
			}
			return true;
		}
		if (num == 1 && female.personality.feelAnus)
		{
			int num3 = UnityEngine.Random.Range(0, 3);
			startPose = "Excite_Anal" + array[num3];
			if (female.customParam.wear.isSwimwear)
			{
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIMLOWER, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_TOPLOWER, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SWIM_BOTTOM, WEAR_SHOW.HALF);
			}
			else
			{
				female.wears.ChangeShow(WEAR_SHOW_TYPE.BOTTOM, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.PANST, WEAR_SHOW.HALF);
				female.wears.ChangeShow(WEAR_SHOW_TYPE.SHORTS, WEAR_SHOW.HIDE);
			}
			return true;
		}
		if (num == 2 && female.personality.likeFeratio)
		{
			int num4 = UnityEngine.Random.Range(0, 3);
			startPose = "Excite_Service" + array[num4];
			return true;
		}
		return false;
	}

	// Token: 0x060011BA RID: 4538 RVA: 0x00073C18 File Offset: 0x00071E18
	private void StartPosePos(H_PoseData data, ref H_Members memberSet, ref H_Pos startPos, ref int posNo)
	{
		if (data.position == H_PoseData.POSITION.FLOOR)
		{
			posNo = UnityEngine.Random.Range(0, this.map.data.h_pos.floor.Count);
			startPos = this.map.data.h_pos.floor[posNo];
			memberSet.floorPosNo = posNo;
		}
		else if (data.position == H_PoseData.POSITION.CHAIR)
		{
			posNo = UnityEngine.Random.Range(0, this.map.data.h_pos.chair.Count);
			startPos = this.map.data.h_pos.chair[posNo];
			memberSet.chairPosNo = posNo;
		}
		else if (data.position == H_PoseData.POSITION.WALL)
		{
			posNo = UnityEngine.Random.Range(0, this.map.data.h_pos.wall.Count);
			startPos = this.map.data.h_pos.wall[posNo];
			memberSet.wallPosNo = posNo;
		}
		else if (data.position == H_PoseData.POSITION.SPECIAL)
		{
			posNo = UnityEngine.Random.Range(0, this.map.data.h_pos.special.Count);
			startPos = this.map.data.h_pos.wall[posNo];
			memberSet.specialPosNo = posNo;
		}
	}

	// Token: 0x060011BB RID: 4539 RVA: 0x00073D94 File Offset: 0x00071F94
	private List<H_Pos> GetPosePosList(H_PoseData pose)
	{
		if (pose.position == H_PoseData.POSITION.WALL)
		{
			return this.map.data.h_pos.wall;
		}
		if (pose.position == H_PoseData.POSITION.CHAIR)
		{
			return this.map.data.h_pos.chair;
		}
		if (pose.position == H_PoseData.POSITION.FLOOR)
		{
			return this.map.data.h_pos.floor;
		}
		if (pose.position == H_PoseData.POSITION.SPECIAL)
		{
			return this.map.data.h_pos.special;
		}
		GlobalData.Debug_LogError("不符合: " + pose.position);
		return new List<H_Pos>();
	}

	// Token: 0x060011BC RID: 4540 RVA: 0x00073E48 File Offset: 0x00072048
	public void StartPose(int memberNo, string startPose)
	{
		H_Members h_Members = this.members[memberNo];
		H_PoseData h_PoseData = this.poseDatas[startPose];
		h_Members.StartPose(h_PoseData);
		if (memberNo == 0)
		{
			this.cameraReset = this.GetCameraReset(startPose);
			if (this.cameraReset == null)
			{
				this.cameraReset = h_PoseData.camera;
			}
			this.cameraReset.ResetCamera(this.camera, h_Members.Transform);
			if (h_PoseData.hasLight)
			{
				this.light.SetDirection(h_PoseData.lightDir);
			}
			int h_Light = 0;
			if (h_PoseData.position == H_PoseData.POSITION.FLOOR)
			{
				h_Light = h_Members.floorPosNo;
			}
			else if (h_PoseData.position == H_PoseData.POSITION.WALL)
			{
				h_Light = h_Members.wallPosNo;
			}
			else if (h_PoseData.position == H_PoseData.POSITION.CHAIR)
			{
				h_Light = h_Members.chairPosNo;
			}
			else if (h_PoseData.position == H_PoseData.POSITION.SPECIAL)
			{
				h_Light = h_Members.specialPosNo;
			}
			this.SetH_Light(h_Light);
		}
	}

	// Token: 0x060011BD RID: 4541 RVA: 0x00073F38 File Offset: 0x00072138
	private void LoadStyles()
	{
		this.LoadStyles_Search("h/ha_*");
		this.LoadStyles_Search("h/hh_*");
		this.LoadStyles_Search("h/hs_*");
		this.LoadStyles_Search("h/hm_*");
		this.LoadStyles_Search("h/hw_*");
	}

	// Token: 0x060011BE RID: 4542 RVA: 0x00073F74 File Offset: 0x00072174
	public void LoadStyles_Search(string search)
	{
		string text = string.Empty;
		int num = search.LastIndexOf("/");
		if (num != -1)
		{
			text = search.Substring(0, num);
			search = search.Remove(0, num + 1);
		}
		string path = GlobalData.assetBundlePath + "/" + text;
		string[] files = Directory.GetFiles(path, search, SearchOption.TopDirectoryOnly);
		foreach (string path2 in files)
		{
			string extension = Path.GetExtension(path2);
			if (extension.Length == 0)
			{
				string text2 = Path.GetFileNameWithoutExtension(path2);
				if (text.Length > 0)
				{
					text2 = text + "/" + text2;
				}
				this.LoadStyle(text2);
			}
		}
	}

	// Token: 0x060011BF RID: 4543 RVA: 0x00074030 File Offset: 0x00072230
	private void LoadStyle(string assetBundle)
	{
		H_StyleData h_StyleData = new H_StyleData(assetBundle);
		this.styleDatas.Add(h_StyleData.id, h_StyleData);
	}

	// Token: 0x060011C0 RID: 4544 RVA: 0x00074058 File Offset: 0x00072258
	private void LoadPoses(AssetBundleController acb)
	{
		TextAsset text = acb.LoadAsset<TextAsset>("H_IN_Data");
		TagText tagText = new TagText(text);
		foreach (TagText.Element element in tagText.Elements)
		{
			H_PoseData h_PoseData = new H_PoseData(element);
			this.poseDatas.Add(h_PoseData.id, h_PoseData);
		}
	}

	// Token: 0x060011C1 RID: 4545 RVA: 0x000740DC File Offset: 0x000722DC
	private void LoadVisitorPoses(AssetBundleController acb)
	{
		TextAsset text = acb.LoadAsset<TextAsset>("H_Visitor_Data");
		TagText tagText = new TagText(text);
		foreach (TagText.Element element in tagText.Elements)
		{
			H_PoseData h_PoseData = new H_PoseData(element);
			this.visitorDatas.Add(h_PoseData.id, h_PoseData);
		}
	}

	// Token: 0x060011C2 RID: 4546 RVA: 0x00074160 File Offset: 0x00072360
	private void Update()
	{
		if (this.mob != null)
		{
			this.mob.gameObject.SetActive(ConfigData.showMob);
		}
		bool enableProcess = true;
		if (this.IsOverlapMode())
		{
			enableProcess = false;
		}
		if (this.visitor != null)
		{
			this.visitor.Update();
		}
		this.pauseMenue.EnableConfig = !this.config.isActiveAndEnabled;
		foreach (H_Members h_Members in this.members)
		{
			h_Members.Update(enableProcess);
		}
		this.UpdateUI(enableProcess);
		this.UpdateShortCutKeys();
		this.femaleGage.value = this.mainMembers.FemaleGageVal;
		this.maleGage.value = this.mainMembers.MaleGageVal;
	}

	// Token: 0x060011C3 RID: 4547 RVA: 0x0007425C File Offset: 0x0007245C
	private void LateUpdate()
	{
		foreach (H_Members h_Members in this.members)
		{
			h_Members.LateUpdate();
		}
	}

	// Token: 0x060011C4 RID: 4548 RVA: 0x000742B8 File Offset: 0x000724B8
	private void UpdateShortCutKeys()
	{
		if (EventSystem.current != null && EventSystem.current.currentSelectedGameObject != null)
		{
			return;
		}
		if (Input.GetKeyDown(KeyCode.R))
		{
			if (this.cameraReset != null)
			{
				this.cameraReset.ResetCamera(this.camera, this.mainMembers.Transform);
			}
		}
		else if (Input.GetKeyDown(KeyCode.Q))
		{
			Vector3 facePos = this.mainMembers.GetFemale(0).FacePos;
			this.camera.SetFocus(facePos, true);
		}
		else if (Input.GetKeyDown(KeyCode.W))
		{
			Transform transform = Transform_Utility.FindTransform(this.mainMembers.GetFemale(0).body.AnimatedBoneRoot, "cf_J_Mune02_L");
			Transform transform2 = Transform_Utility.FindTransform(this.mainMembers.GetFemale(0).body.AnimatedBoneRoot, "cf_J_Mune02_R");
			Vector3 focus = (transform.position + transform2.position) * 0.5f;
			this.camera.SetFocus(focus, true);
		}
		else if (Input.GetKeyDown(KeyCode.E))
		{
			Transform transform3 = Transform_Utility.FindTransform(this.mainMembers.GetFemale(0).body.AnimatedBoneRoot, "cf_J_Kokan");
			this.camera.SetFocus(transform3.position, true);
		}
	}

	// Token: 0x060011C5 RID: 4549 RVA: 0x00074410 File Offset: 0x00072610
	private void UpdateUI(bool enableProcess)
	{
		this.uiCanvas.enabled = (enableProcess && !base.GC.IsHideUI && !this.ExitStandBy);
		this.middleLeftCanvas.enabled = (!this.config.isActiveAndEnabled && !base.GC.IsHideUI && !this.ExitStandBy);
		bool active = false;
		bool active2 = false;
		bool active3 = false;
		bool active4 = false;
		bool active5 = false;
		bool active6 = this.mainMembers.StateMgr.NowStateID != H_STATE.START;
		this.padRoot.SetActive(active6);
		this.talkButton.gameObject.SetActive(active6);
		this.talkButton.interactable = (this.mainMembers.StateMgr.NowStateID == H_STATE.LOOP);
		this.femaleGage.value = this.mainMembers.FemaleGageVal;
		this.maleGage.value = this.mainMembers.MaleGageVal;
		if (this.mainMembers.StateMgr.NowStateID == H_STATE.LOOP)
		{
			bool flag = this.mainMembers.StyleData.type == H_StyleData.TYPE.INSERT || this.mainMembers.StyleData.type == H_StyleData.TYPE.PETTING;
			bool flag2 = this.mainMembers.StyleData.type == H_StyleData.TYPE.INSERT || this.mainMembers.StyleData.type == H_StyleData.TYPE.SERVICE;
			active = flag2;
			active2 = flag2;
			if (this.mainMembers.StyleData.type == H_StyleData.TYPE.SERVICE && !this.mainMembers.StyleData.IsInMouth())
			{
				active = false;
			}
			if (this.mainMembers.FemaleGageVal >= this.femaleXTCEnableVal)
			{
				active3 = flag;
				active4 = (flag && flag2);
			}
		}
		if (this.mainMembers.StateMgr.NowStateID == H_STATE.IN_XTC_AFTER_WAIT)
		{
			if (this.mainMembers.StyleData.type == H_StyleData.TYPE.INSERT)
			{
				active5 = true;
			}
			else if (this.mainMembers.StyleData.type == H_StyleData.TYPE.SERVICE && this.mainMembers.StyleData.IsInMouth())
			{
				active5 = true;
			}
		}
		bool active7 = this.mainMembers.StateMgr.NowStateID == H_STATE.SHOW_MOUTH_LIQUID;
		if (this.mainMembers.StyleData != null && (this.mainMembers.StyleData.detailFlag & 4096) != 0)
		{
			active2 = false;
			active5 = false;
		}
		this.buttonInEja.gameObject.SetActive(active);
		this.buttonOutEja.gameObject.SetActive(active2);
		this.buttonXTC_F.gameObject.SetActive(active3);
		this.buttonXTC_W.gameObject.SetActive(active4);
		this.buttonExtract.gameObject.SetActive(active5);
		this.buttonVomit.gameObject.SetActive(active7);
		this.buttonDrink.gameObject.SetActive(active7);
		if (this.editMode != null)
		{
			this.editMode.ShowUI(!this.config.isActiveAndEnabled);
			this.hEditModeEndCanvas.enabled = (!this.config.isActiveAndEnabled && !base.GC.IsHideUI);
		}
		this.editFemale.interactable = (this.editChara != H_Scene.EDIT_CHARA.FEMALE);
		this.editMale.interactable = (this.editChara != H_Scene.EDIT_CHARA.MALE && this.mainMembers.GetMale(0).gameObject.activeSelf);
		if (this.visitor != null)
		{
			this.editVisitor.interactable = (this.editChara != H_Scene.EDIT_CHARA.VISITOR);
		}
		int count = this.mainMembers.GetMales().Count;
		this.editMaleMobA.gameObject.SetActive(count >= 2);
		this.editMaleMobA.interactable = (this.editChara != H_Scene.EDIT_CHARA.MOB_A);
		this.editMaleMobB.gameObject.SetActive(count >= 3);
		this.editMaleMobB.interactable = (this.editChara != H_Scene.EDIT_CHARA.MOB_B);
		this.editMaleMobC.gameObject.SetActive(count >= 4);
		this.editMaleMobC.interactable = (this.editChara != H_Scene.EDIT_CHARA.MOB_C);
		this.buttonExit.interactable = this.ExitEnable;
		this.weaknessShowUI.SetActive(this.mainMembers.GetFemale(0).personality.weakness);
		this.weaknessRecoveryButton.gameObject.SetActive(GlobalData.PlayData.unlockWeaknessRecovery);
		bool flag3 = H_Scene.ui_StateCheckList[(int)this.mainMembers.StateMgr.NowStateID];
		bool flag4 = this.editChara >= H_Scene.EDIT_CHARA.MOB_A && this.editChara <= H_Scene.EDIT_CHARA.MOB_C;
		this.styleChangeUI.Interactable = (flag3 && !flag4);
		if (!this.styleChangeUI.Interactable)
		{
			this.styleChangeUI.Close();
		}
		this.mapToggleButton.Interactable = (!this.IsEvent && flag3 && !flag4);
		if (!this.mapToggleButton.Interactable)
		{
			this.mapToggleButton.ChangeValue(false, true);
		}
		this.swapButton.interactable = (!this.IsEvent && flag3 && this.mainMembers.StateMgr.NowStateID != H_STATE.START);
		this.moveToggleButton.Interactable = !this.IsEvent;
	}

	// Token: 0x060011C6 RID: 4550 RVA: 0x0007499C File Offset: 0x00072B9C
	public static void SetInput(H_Members members, H_InputBase input)
	{
		input.SetMembers(members);
		members.input = input;
	}

	// Token: 0x060011C7 RID: 4551 RVA: 0x000749AC File Offset: 0x00072BAC
	public void OnInput(H_INPUT input)
	{
		foreach (H_Members h_Members in this.members)
		{
			h_Members.OnInput(input);
		}
	}

	// Token: 0x060011C8 RID: 4552 RVA: 0x00074A08 File Offset: 0x00072C08
	public void Button_EjaIn()
	{
		this.OnInput(H_INPUT.EJA_IN);
	}

	// Token: 0x060011C9 RID: 4553 RVA: 0x00074A14 File Offset: 0x00072C14
	public void Button_EjaOut()
	{
		this.OnInput(H_INPUT.EJA_OUT);
	}

	// Token: 0x060011CA RID: 4554 RVA: 0x00074A20 File Offset: 0x00072C20
	public void Button_XTC_F()
	{
		this.OnInput(H_INPUT.XTC_F);
	}

	// Token: 0x060011CB RID: 4555 RVA: 0x00074A2C File Offset: 0x00072C2C
	public void Button_XTC_W()
	{
		this.OnInput(H_INPUT.XTC_W);
	}

	// Token: 0x060011CC RID: 4556 RVA: 0x00074A38 File Offset: 0x00072C38
	public void Button_Extract()
	{
		this.OnInput(H_INPUT.EXTRACT);
	}

	// Token: 0x060011CD RID: 4557 RVA: 0x00074A44 File Offset: 0x00072C44
	public void Button_Vomit()
	{
		this.OnInput(H_INPUT.VOMIT);
	}

	// Token: 0x060011CE RID: 4558 RVA: 0x00074A50 File Offset: 0x00072C50
	public void Button_Drink()
	{
		this.OnInput(H_INPUT.DRINK);
	}

	// Token: 0x060011CF RID: 4559 RVA: 0x00074A5C File Offset: 0x00072C5C
	public void OpenConfig()
	{
		this.config.gameObject.SetActive(true);
		this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_open);
	}

	// Token: 0x060011D0 RID: 4560 RVA: 0x00074A90 File Offset: 0x00072C90
	public void Button_Exit()
	{
		this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_choice);
		this.gameCtrl.CreateModalYesNoUI("Hシーンを終了しますか？", new Action(this.ExitState), null);
	}

	// Token: 0x060011D1 RID: 4561 RVA: 0x00074AD0 File Offset: 0x00072CD0
	private void ExitState()
	{
		this.pauseMenue.enabled = false;
		this.ExitStandBy = true;
		this.mainMembers.StateMgr.ChangeState(H_STATE.EXIT, null);
	}

	// Token: 0x060011D2 RID: 4562 RVA: 0x00074AF8 File Offset: 0x00072CF8
	public void Exit()
	{
		this.NextScene();
	}

	// Token: 0x060011D3 RID: 4563 RVA: 0x00074B00 File Offset: 0x00072D00
	private void NextScene()
	{
		this.SceneEndParamaCalc();
		if (this.sceneInMsg == "RitsukoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FIRST_AKIKO;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_00_02,ADV_Script_00_02", 1f);
		}
		else if (this.sceneInMsg == "AkikoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FIRST_YUKIKO;
				this.gameCtrl.ChangeScene("ADVScene", "adv/adv_00_04,ADV_Script_00_04", 1f);
			}
			else
			{
				this.gameCtrl.ChangeScene("SelectScene", "MemoryEnd", 1f);
			}
		}
		else if (this.sceneInMsg == "YukikoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.RESIST;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_00_05,ADV_Script_00_05", 1f);
		}
		else if (this.sceneInMsg == "YukikoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLIPFLOP_AKIKO;
				this.gameCtrl.ChangeScene("ADVScene", "adv/adv_01_01,ADV_Script_01_01", 1f);
			}
			else
			{
				this.gameCtrl.ChangeScene("SelectScene", "MemoryEnd", 1f);
			}
		}
		else if (this.sceneInMsg == "AkikoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLIPFLOP_RITSUKO;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_01_02,ADV_Script_01_02", 1f);
		}
		else if (this.sceneInMsg == "RitsukoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLOP;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_01_04,ADV_Script_01_04", 1f);
		}
		else if (this.sceneInMsg == "FinalYukikoH1")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.END_SISTERS;
				this.gameCtrl.ChangeScene("ADVScene", "adv/adv_02_01,ADV_Script_02_01", 1f);
			}
			else
			{
				this.gameCtrl.ChangeScene("SelectScene", "MemoryEnd", 1f);
			}
		}
		else if (this.sceneInMsg == "FinalSistersH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.END_YUKIKO_2;
				this.gameCtrl.ChangeScene("ADVScene", "adv/adv_02_02,ADV_Script_02_02", 1f);
			}
			else
			{
				this.gameCtrl.ChangeScene("SelectScene", "MemoryEnd", 1f);
			}
		}
		else if (this.sceneInMsg == "FinalYukikoH2")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.CLEAR_MAIN;
				this.gameCtrl.ChangeScene("ADVScene", "adv/adv_02_03,ADV_Script_02_03", 1f);
			}
			else
			{
				this.gameCtrl.ChangeScene("SelectScene", "MemoryEnd", 1f);
			}
		}
		else if (this.sceneInMsg == "MarikoFirstH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.RESIST_MARIKO;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_10_01,ADV_Script_10_01", 1f);
		}
		else if (this.sceneInMsg == "MarikoFlipFlopH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.FLOP_MARIKO;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_11_01,ADV_Script_11_01", 1f);
		}
		else if (this.sceneInMsg == "FinalMarikoH")
		{
			if (!GlobalData.isMemory)
			{
				GlobalData.PlayData.Progress = GamePlayData.PROGRESS.ALL_FREE;
			}
			this.gameCtrl.ChangeScene("ADVScene", "adv/adv_12_01,ADV_Script_12_01", 1f);
		}
		else
		{
			this.gameCtrl.ChangeScene("SelectScene", string.Empty, 1f);
		}
	}

	// Token: 0x060011D4 RID: 4564 RVA: 0x00074F3C File Offset: 0x0007313C
	private void SceneEndParamaCalc()
	{
		for (HEROINE heroine = HEROINE.RITSUKO; heroine < HEROINE.NUM; heroine++)
		{
			Personality heroinePersonality = GlobalData.PlayData.GetHeroinePersonality(heroine);
			if (heroinePersonality.insertVagina)
			{
				heroinePersonality.continuousInsVagina++;
			}
			else
			{
				if (heroinePersonality.continuousInsVagina > 0)
				{
					heroinePersonality.continuousInsVagina = 0;
				}
				heroinePersonality.continuousInsVagina--;
			}
			if (heroinePersonality.insertAnal)
			{
				heroinePersonality.continuousInsAnal++;
			}
			else
			{
				if (heroinePersonality.continuousInsAnal > 0)
				{
					heroinePersonality.continuousInsAnal = 0;
				}
				heroinePersonality.continuousInsAnal--;
			}
			heroinePersonality.insertVagina = false;
			heroinePersonality.insertAnal = false;
		}
	}

	// Token: 0x060011D5 RID: 4565 RVA: 0x00074FF4 File Offset: 0x000731F4
	public void ChangeStyle(string id)
	{
		if (!this.styleDatas.ContainsKey(id))
		{
			return;
		}
		H_StyleData styleData = this.mainMembers.StyleData;
		IllusionCameraResetData illusionCameraResetData = this.CalcRelativeCamera();
		H_StyleData h_StyleData = this.styleDatas[id];
		List<Male> males = this.mainMembers.GetMales();
		foreach (Male male in males)
		{
			male.gameObject.SetActive(true);
		}
		this.mainMembers.ChangeStyle(h_StyleData);
		this.UpdateMaleShowUI();
		this.MixCtrl.ChangeStyle();
		this.ChangeStyle_ChangeState(styleData, h_StyleData);
		H_StyleData h_StyleData2 = this.styleDatas[id];
		this.cameraReset = this.GetCameraReset(id);
		if (this.cameraReset == null)
		{
			this.cameraReset = h_StyleData2.camera;
		}
		bool flag = styleData != null && styleData.id == h_StyleData2.id;
		IllusionCameraResetData illusionCameraResetData2 = illusionCameraResetData;
		if (((ConfigData.h_camReset_style && !flag) || illusionCameraResetData2 == null) && this.cameraReset != null)
		{
			illusionCameraResetData2 = this.cameraReset;
		}
		if (illusionCameraResetData2 != null)
		{
			illusionCameraResetData2.ResetCamera(this.camera, this.mainMembers.Transform);
		}
	}

	// Token: 0x060011D6 RID: 4566 RVA: 0x00075154 File Offset: 0x00073354
	private void ChangeStyle_ChangeState(H_StyleData prev, H_StyleData next)
	{
		bool flag = prev != null && prev.type == next.type;
		bool flag2 = this.mainMembers.StateMgr.NowStateID == H_STATE.LOOP;
		bool flag3 = ConfigData.h_action_continue && flag && flag2;
		if (next.type == H_StyleData.TYPE.PETTING)
		{
			if (flag3)
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.LOOP, new H_State.BlendMessage(0f));
			}
			else
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.PRE_TOUCH_WAIT, new H_State.BlendMessage(0f));
			}
		}
		else if (next.type == H_StyleData.TYPE.INSERT)
		{
			int num = (prev == null) ? 0 : (prev.detailFlag & next.detailFlag);
			bool flag4 = (num & 32) != 0 || (num & 16) != 0;
			if (flag3 && flag4)
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.LOOP, new H_State.BlendMessage(0f));
			}
			else
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.PRE_INSERT_WAIT, new H_State.BlendMessage(0f));
			}
		}
		else if (next.type == H_StyleData.TYPE.SERVICE)
		{
			bool flag5 = prev != null && prev.IsInMouth() == next.IsInMouth();
			if (flag3 && flag5)
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.LOOP, new H_State.BlendMessage(0f));
			}
			else if (next.IsInMouth())
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.PRE_INSERT_WAIT, new H_State.BlendMessage(0f));
			}
			else
			{
				this.mainMembers.StateMgr.ChangeState(H_STATE.PRE_TOUCH_WAIT, new H_State.BlendMessage(0f));
			}
		}
	}

	// Token: 0x060011D7 RID: 4567 RVA: 0x00075318 File Offset: 0x00073518
	public void ChangeStyleLight()
	{
		int h_Light;
		H_Pos h_Pos;
		this.mainMembers.GetNowDataPosNo(out h_Light, out h_Pos);
		this.SetH_Light(h_Light);
	}

	// Token: 0x060011D8 RID: 4568 RVA: 0x0007533C File Offset: 0x0007353C
	private void Select_ChangeTimeZone(int no)
	{
		if (no >= 0)
		{
			SystemSE.Play(SystemSE.SE.CHOICE);
			this.ChangeTimeZone(no);
		}
	}

	// Token: 0x060011D9 RID: 4569 RVA: 0x00075354 File Offset: 0x00073554
	private void ChangeTimeZone(int no)
	{
		if (GlobalData.PlayData.lastSelectTimeZone != no)
		{
			GlobalData.PlayData.lastSelectTimeZone = no;
			this.LoadMap(true);
		}
	}

	// Token: 0x060011DA RID: 4570 RVA: 0x00075378 File Offset: 0x00073578
	public H_Voice.Data Voice(Female female, H_VoiceLog log, H_Voice.TYPE type, H_Members members)
	{
		return this.voice.Voice(female, log, this.voiceABC[(int)female.HeroineID], type, members);
	}

	// Token: 0x060011DB RID: 4571 RVA: 0x00075398 File Offset: 0x00073598
	public H_ExpressionData.Data Expression(Female female, string voice, H_Parameter param)
	{
		return this.expression.ChangeExpression(female, voice, param);
	}

	// Token: 0x060011DC RID: 4572 RVA: 0x000753A8 File Offset: 0x000735A8
	public H_ExpressionData.Data Expression(Female female, H_Expression.TYPE type, H_Parameter param)
	{
		return this.expression.ChangeExpression(female, type, param);
	}

	// Token: 0x060011DD RID: 4573 RVA: 0x000753B8 File Offset: 0x000735B8
	public H_ExpressionData_Male.Data Expression(Male male, H_Expression_Male.TYPE type, H_Parameter param)
	{
		return this.expression_M.ChangeExpression(male, type, param);
	}

	// Token: 0x060011DE RID: 4574 RVA: 0x000753C8 File Offset: 0x000735C8
	public bool VisitorVoiceExpression(H_VisitorVoice.TYPE type)
	{
		if (this.visitor != null)
		{
			Female female = this.visitor.GetFemale();
			if (female != null)
			{
				return this.visitor.VoiceExpression(type, this.voiceABC[(int)female.HeroineID], this.mainMembers);
			}
		}
		return false;
	}

	// Token: 0x060011DF RID: 4575 RVA: 0x0007541C File Offset: 0x0007361C
	public void SetGageLock_F(bool flag)
	{
		if (flag)
		{
			this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_yes);
		}
		else
		{
			this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_no);
		}
	}

	// Token: 0x060011E0 RID: 4576 RVA: 0x00075474 File Offset: 0x00073674
	public void SetGageLock_M(bool flag)
	{
		if (flag)
		{
			this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_yes);
		}
		else
		{
			this.gameCtrl.audioCtrl.Play2DSE(this.gameCtrl.audioCtrl.systemSE_no);
		}
	}

	// Token: 0x060011E1 RID: 4577 RVA: 0x000754CC File Offset: 0x000736CC
	public void OnClickTalk()
	{
		this.mainMembers.VoiceExpression(H_Voice.TYPE.ACT_TALK);
		foreach (Female female in this.mainMembers.GetFemales())
		{
			female.personality.AddIndecentLanguage();
		}
	}

	// Token: 0x060011E2 RID: 4578 RVA: 0x00075540 File Offset: 0x00073740
	public void CharaCustom_Female()
	{
		if (this.editMode != null)
		{
			string text = "カスタムを切り替える前に変更を適用しますか？";
			string[] choices = new string[]
			{
				"変更を適用して切り替え",
				"変更を戻して切り替え",
				"カスタムに戻る"
			};
			Action[] array = new Action[3];
			array[0] = delegate()
			{
				this.ToCharaCustom_Female(true);
			};
			array[1] = delegate()
			{
				this.ToCharaCustom_Female(false);
			};
			Action[] acts = array;
			this.gameCtrl.CreateModalChoices(text, choices, acts);
		}
		else
		{
			this.ToCharaCustom_Female(false);
		}
	}

	// Token: 0x060011E3 RID: 4579 RVA: 0x000755C4 File Offset: 0x000737C4
	private void ToCharaCustom_Female(bool destroyRecord)
	{
		this.ToCharaCustom(destroyRecord);
		this.editMode.Setup(this.mainMembers.GetFemale(0), null);
		this.editChara = H_Scene.EDIT_CHARA.FEMALE;
	}

	// Token: 0x060011E4 RID: 4580 RVA: 0x000755EC File Offset: 0x000737EC
	public void CharaCustom_Male(int no)
	{
		if (this.editMode != null)
		{
			string text = "カスタムを切り替える前に変更を適用しますか？";
			string[] choices = new string[]
			{
				"変更を適用して切り替え",
				"変更を戻して切り替え",
				"カスタムに戻る"
			};
			Action[] array = new Action[3];
			array[0] = delegate()
			{
				this.ToCharaCustom_Male(no, true);
			};
			array[1] = delegate()
			{
				this.ToCharaCustom_Male(no, false);
			};
			Action[] acts = array;
			this.gameCtrl.CreateModalChoices(text, choices, acts);
		}
		else
		{
			this.ToCharaCustom_Male(no, false);
		}
	}

	// Token: 0x060011E5 RID: 4581 RVA: 0x00075688 File Offset: 0x00073888
	private void ToCharaCustom_Male(int no, bool destroyRecord)
	{
		this.ToCharaCustom(destroyRecord);
		this.editMode.Setup(this.mainMembers.GetMale(no), null);
		if (no == 0)
		{
			this.editChara = H_Scene.EDIT_CHARA.MALE;
		}
		else if (no == 1)
		{
			this.editChara = H_Scene.EDIT_CHARA.MOB_A;
		}
		else if (no == 2)
		{
			this.editChara = H_Scene.EDIT_CHARA.MOB_B;
		}
		else if (no == 3)
		{
			this.editChara = H_Scene.EDIT_CHARA.MOB_C;
		}
	}

	// Token: 0x060011E6 RID: 4582 RVA: 0x000756FC File Offset: 0x000738FC
	public void CharaCustom_Visitor()
	{
		if (this.editMode != null)
		{
			string text = "カスタムを切り替える前に変更を適用しますか？";
			string[] choices = new string[]
			{
				"変更を適用して切り替え",
				"変更を戻して切り替え",
				"カスタムに戻る"
			};
			Action[] array = new Action[3];
			array[0] = delegate()
			{
				this.ToCharaCustom_Visitor(true);
			};
			array[1] = delegate()
			{
				this.ToCharaCustom_Visitor(false);
			};
			Action[] acts = array;
			this.gameCtrl.CreateModalChoices(text, choices, acts);
		}
		else
		{
			this.ToCharaCustom_Visitor(false);
		}
	}

	// Token: 0x060011E7 RID: 4583 RVA: 0x00075780 File Offset: 0x00073980
	private void ToCharaCustom_Visitor(bool destroyRecord)
	{
		this.ToCharaCustom(destroyRecord);
		this.editMode.Setup(this.visitor.GetHuman(), null);
		this.editChara = H_Scene.EDIT_CHARA.VISITOR;
	}

	// Token: 0x060011E8 RID: 4584 RVA: 0x000757A8 File Offset: 0x000739A8
	private void ToCharaCustom(bool destroyRecord)
	{
		if (this.editMode != null)
		{
			if (destroyRecord)
			{
				this.editMode.RecordCustomData();
			}
			else
			{
				this.editMode.RevertCustomData();
			}
			this.editMode.gameObject.SetActive(false);
			this.hEditModeEndCanvas.gameObject.SetActive(false);
			UnityEngine.Object.Destroy(this.editMode.gameObject);
			this.editMode = null;
			Resources.UnloadUnusedAssets();
		}
		this.hEditModeEndCanvas.gameObject.SetActive(true);
		this.editMode = UnityEngine.Object.Instantiate<EditMode>(this.editModeOriginal);
		this.editMode.moveableRoot = this.moveableRoot;
		this.editMode.colorUI = this.colorUI;
		this.editMode.gameObject.SetActive(true);
	}

	// Token: 0x060011E9 RID: 4585 RVA: 0x0007587C File Offset: 0x00073A7C
	public void Button_CustomEnd()
	{
		GameControl gameCtrl = this.gameCtrl;
		string text = "カスタムを終了しますか？";
		string[] choices = new string[]
		{
			"変更を適用して終了",
			"変更を戻して終了",
			"キャンセル"
		};
		Action[] array = new Action[3];
		array[0] = new Action(this.CustomEnd_Record);
		array[1] = new Action(this.CustomEnd_Revert);
		gameCtrl.CreateModalChoices(text, choices, array);
	}

	// Token: 0x060011EA RID: 4586 RVA: 0x000758DC File Offset: 0x00073ADC
	private void CustomEnd_Record()
	{
		this.editMode.RecordCustomData();
		this.editMode.gameObject.SetActive(false);
		this.hEditModeEndCanvas.gameObject.SetActive(false);
		UnityEngine.Object.Destroy(this.editMode.gameObject);
		this.editMode = null;
		Resources.UnloadUnusedAssets();
		this.editChara = H_Scene.EDIT_CHARA.NONE;
	}

	// Token: 0x060011EB RID: 4587 RVA: 0x0007593C File Offset: 0x00073B3C
	private void CustomEnd_Revert()
	{
		this.editMode.RevertCustomData();
		this.editMode.gameObject.SetActive(false);
		this.hEditModeEndCanvas.gameObject.SetActive(false);
		UnityEngine.Object.Destroy(this.editMode.gameObject);
		this.editMode = null;
		Resources.UnloadUnusedAssets();
		this.editChara = H_Scene.EDIT_CHARA.NONE;
	}

	// Token: 0x060011EC RID: 4588 RVA: 0x0007599C File Offset: 0x00073B9C
	public void SetH_Light(int no)
	{
		string id = (this.mainMembers.StyleData == null) ? this.mainMembers.PoseData.id : this.mainMembers.StyleData.id;
		Vector3 lightDir = this.h_light.Get(id, no);
		this.SetLightDir(lightDir);
	}

	// Token: 0x060011ED RID: 4589 RVA: 0x000759F4 File Offset: 0x00073BF4
	public void SetLightDir(Vector3 euler)
	{
		this.light.SetDirection(euler);
	}

	// Token: 0x060011EE RID: 4590 RVA: 0x00075A04 File Offset: 0x00073C04
	public Animator CreateMapIK()
	{
		return UnityEngine.Object.Instantiate<Animator>(this.mapIK_Original);
	}

	// Token: 0x060011EF RID: 4591 RVA: 0x00075A14 File Offset: 0x00073C14
	public void VisitorPos(H_Pos h_pos, int posNo = -1)
	{
		if (this.visitor != null && h_pos != null)
		{
			if (posNo >= 0)
			{
				this.visitor.SetPose(this.visitorDatas, h_pos, posNo);
			}
			else
			{
				this.visitor.RandomPose(this.visitorDatas, h_pos);
			}
		}
	}

	// Token: 0x060011F0 RID: 4592 RVA: 0x00075A64 File Offset: 0x00073C64
	public void SwapVisitor()
	{
		ScreenFade.StartFade(ScreenFade.TYPE.OUT_IN, Color.black, 0.5f, 0f, new Action(this.SwapVisitor_EXE), true);
		SystemSE.Play(SystemSE.SE.YES);
	}

	// Token: 0x060011F1 RID: 4593 RVA: 0x00075A90 File Offset: 0x00073C90
	public void SwapVisitor_EXE()
	{
		if (this.mainMembers.StyleData == null)
		{
			return;
		}
		Female female = this.visitor.GetHuman() as Female;
		Female female2 = this.mainMembers.GetFemale(0);
		this.mainMembers.param.swapVisitor++;
		string id = this.mainMembers.StyleData.id;
		if (this.mainMembers.GetFemales().Count == 1)
		{
			female2.transform.SetParent(null);
			this.visitor.SwapHuman(female2, this.voiceABC[(int)female2.HeroineID], this.mainMembers, false);
			female2.transform.position = female.transform.position;
			female2.transform.rotation = female.transform.rotation;
			this.mainMembers.SwapFemale(0, female);
			this.mainMembers.ClearIK();
			this.visitor.GetHuman().ik.ClearIK();
			GlobalData.PlayData.lastSelectVisitor = Female.HeroineIDtoVisitorID(female2.HeroineID);
			GlobalData.PlayData.lastSelectFemale = female.HeroineID;
			female.personality.ahe = false;
			female.personality.weakness = false;
			female.personality.spermInCntV = 0;
			female.personality.spermInCntA = 0;
			female2.personality.ahe = false;
			female2.personality.weakness = false;
			female2.personality.spermInCntV = 0;
			female2.personality.spermInCntA = 0;
			this.StyleChangeUI.UpdateList();
			if (female.HeroineID != HEROINE.MARIKO)
			{
				if (GlobalData.PlayData.Progress < GamePlayData.PROGRESS.CLEAR_MAIN)
				{
					H_StyleData styleData = this.mainMembers.StyleData;
					if (styleData.state == H_StyleData.STATE.WEAKNESS)
					{
						string[] array = styleData.id.Split(new char[]
						{
							'_'
						}, StringSplitOptions.RemoveEmptyEntries);
						string text = (!female.IsFloped()) ? "00" : "01";
						id = string.Concat(new string[]
						{
							array[0],
							"_",
							array[1],
							"_",
							text,
							"_",
							array[3]
						});
					}
				}
			}
			else if (GlobalData.PlayData.Progress < GamePlayData.PROGRESS.ALL_FREE)
			{
				H_StyleData styleData2 = this.mainMembers.StyleData;
				if (styleData2.state == H_StyleData.STATE.WEAKNESS)
				{
					string[] array2 = styleData2.id.Split(new char[]
					{
						'_'
					}, StringSplitOptions.RemoveEmptyEntries);
					string text2 = (!female.IsFloped()) ? "00" : "01";
					id = string.Concat(new string[]
					{
						array2[0],
						"_",
						array2[1],
						"_",
						text2,
						"_",
						array2[3]
					});
				}
			}
			this.ChangeStyle(id);
			this.visitor.ChangePose();
		}
		else
		{
			this.visitor.SwapHuman(female2, this.voiceABC[(int)female2.HeroineID], this.mainMembers, true);
			this.mainMembers.SwapFemale01();
			this.mainMembers.ClearIK();
			GlobalData.PlayData.lastSelectVisitor = Female.HeroineIDtoVisitorID(female2.HeroineID);
			GlobalData.PlayData.lastSelectFemale = female.HeroineID;
			this.StyleChangeUI.UpdateList();
			this.ChangeStyle(id);
		}
		this.SetMainFemaleName();
		this.editFemale.GetComponentInChildren<Text>().text = Female.HeroineName(female.HeroineID);
		this.editVisitor.GetComponentInChildren<Text>().text = Female.HeroineName(female2.HeroineID);
		this.gagUI.SetNameUI();
		this.gagUI.Refresh(this);
		this.badgeFeelVagina.SetActive(female.personality.feelVagina);
		this.badgeFeelAnus.SetActive(female.personality.feelAnus);
		this.badgeIndecentLanguage.SetActive(female.personality.indecentLanguage);
		this.badgeLikeFeratio.SetActive(female.personality.likeFeratio);
		this.badgeLikeSperm.SetActive(female.personality.likeSperm);
		this.wearAcceChangeUI.SwitchedFemaleVisitor();
		this.styleChangeUI.Setup(this, this.styleDatas);
		this.charaMove.SetNameUI();
		this.charaMove.ChangeTrans();
	}

	// Token: 0x060011F2 RID: 4594 RVA: 0x00075EE4 File Offset: 0x000740E4
	private void SetMainFemaleName()
	{
		this.mainFemaleName.text = Female.HeroineName(this.mainMembers.GetFemale(0).HeroineID);
	}

	// Token: 0x060011F3 RID: 4595 RVA: 0x00075F08 File Offset: 0x00074108
	public void NextMapPos_MainMember()
	{
		IllusionCameraResetData illusionCameraResetData = this.CalcRelativeCamera();
		if (ConfigData.h_camReset_position && this.cameraReset != null)
		{
			illusionCameraResetData = this.cameraReset;
		}
		H_Pos h_pos = this.mainMembers.NextPos();
		illusionCameraResetData.ResetCamera(this.camera, this.mainMembers.Transform);
		this.VisitorPos(h_pos, -1);
	}

	// Token: 0x060011F4 RID: 4596 RVA: 0x00075F64 File Offset: 0x00074164
	public void PrevMapPos_MainMember()
	{
		IllusionCameraResetData illusionCameraResetData = this.CalcRelativeCamera();
		if (ConfigData.h_camReset_position && this.cameraReset != null)
		{
			illusionCameraResetData = this.cameraReset;
		}
		H_Pos h_pos = this.mainMembers.PrevPos();
		illusionCameraResetData.ResetCamera(this.camera, this.mainMembers.Transform);
		this.VisitorPos(h_pos, -1);
	}

	// Token: 0x060011F5 RID: 4597 RVA: 0x00075FC0 File Offset: 0x000741C0
	public void NextMapPos_Visitor()
	{
		if (this.visitor != null)
		{
			this.visitor.NextPos();
		}
	}

	// Token: 0x060011F6 RID: 4598 RVA: 0x00075FD8 File Offset: 0x000741D8
	public void PrevMapPos_Visitor()
	{
		if (this.visitor != null)
		{
			this.visitor.PrevPos();
		}
	}

	// Token: 0x060011F7 RID: 4599 RVA: 0x00075FF0 File Offset: 0x000741F0
	public bool CheckEnableStyle(string id)
	{
		if (this.styleDatas.ContainsKey(id))
		{
			H_StyleData h_StyleData = this.styleDatas[id];
			return (h_StyleData.map.Length <= 0 || this.map.name.IndexOf(h_StyleData.map) == 0) && this.map.data.h_pos.CheckEnable(h_StyleData.position);
		}
		return false;
	}

	// Token: 0x060011F8 RID: 4600 RVA: 0x00076070 File Offset: 0x00074270
	public void OnWeaknessRecovery()
	{
		List<Female> females = this.mainMembers.GetFemales();
		this.mainMembers.param.continuanceXTC_F = 0;
		for (int i = 0; i < females.Count; i++)
		{
			females[i].personality.ahe = false;
			females[i].personality.weakness = false;
		}
		this.StyleChangeUI.UpdateList();
		if (females[0].HeroineID != HEROINE.MARIKO)
		{
			if (GlobalData.PlayData.Progress != GamePlayData.PROGRESS.CLEAR_MAIN)
			{
				H_StyleData styleData = this.mainMembers.StyleData;
				if (styleData.state == H_StyleData.STATE.WEAKNESS)
				{
					string[] array = styleData.id.Split(new char[]
					{
						'_'
					}, StringSplitOptions.RemoveEmptyEntries);
					string text = (!females[0].IsFloped()) ? "00" : "01";
					string id = string.Concat(new string[]
					{
						array[0],
						"_",
						array[1],
						"_",
						text,
						"_",
						array[3]
					});
					this.ChangeStyle(id);
				}
			}
		}
		else if (GlobalData.PlayData.Progress != GamePlayData.PROGRESS.ALL_FREE)
		{
			H_StyleData styleData2 = this.mainMembers.StyleData;
			if (styleData2.state == H_StyleData.STATE.WEAKNESS)
			{
				string[] array2 = styleData2.id.Split(new char[]
				{
					'_'
				}, StringSplitOptions.RemoveEmptyEntries);
				string text2 = (!females[0].IsFloped()) ? "00" : "01";
				string id2 = string.Concat(new string[]
				{
					array2[0],
					"_",
					array2[1],
					"_",
					text2,
					"_",
					array2[3]
				});
				this.ChangeStyle(id2);
			}
		}
	}

	// Token: 0x060011F9 RID: 4601 RVA: 0x0007624C File Offset: 0x0007444C
	public bool IsOverlapMode()
	{
		return (this.editMode != null && this.editMode.isActiveAndEnabled) || this.config.isActiveAndEnabled;
	}

	// Token: 0x060011FA RID: 4602 RVA: 0x00076280 File Offset: 0x00074480
	public IllusionCameraResetData CalcRelativeCamera()
	{
		if (this.mainMembers == null)
		{
			return null;
		}
		IllusionCameraResetData illusionCameraResetData = new IllusionCameraResetData();
		Vector3 focus = this.camera.Focus;
		Vector3 rotation = this.camera.Rotation;
		float distance = this.camera.Distance;
		Transform transform = this.mainMembers.Transform;
		illusionCameraResetData.pos = transform.InverseTransformPoint(focus);
		illusionCameraResetData.eul.x = rotation.x;
		illusionCameraResetData.eul.y = rotation.y - transform.rotation.eulerAngles.y;
		illusionCameraResetData.eul.z = rotation.z;
		float num = 25f / ConfigData.defParse;
		illusionCameraResetData.dis = distance / num;
		return illusionCameraResetData;
	}

	// Token: 0x0400136F RID: 4975
	public MixController MixCtrl;

	// Token: 0x04001370 RID: 4976
	public static readonly int AnmParamID_Pose = Animator.StringToHash("Pose");

	// Token: 0x04001371 RID: 4977
	public static readonly int AnmParamID_Stroke = Animator.StringToHash("Stroke");

	// Token: 0x04001372 RID: 4978
	public static readonly int AnmParamID_Height = Animator.StringToHash("Height");

	// Token: 0x04001373 RID: 4979
	public static readonly int AnmParamID_Bust = Animator.StringToHash("Bust");

	// Token: 0x04001374 RID: 4980
	private static readonly bool[] ui_StateCheckList = new bool[]
	{
		true,
		true,
		true,
		false,
		true,
		true,
		false,
		false,
		false,
		false,
		false,
		false,
		false,
		false,
		false,
		true,
		true,
		false,
		true,
		false,
		true,
		false,
		false,
		true,
		false,
		true,
		false
	};

	// Token: 0x04001375 RID: 4981
	public float femaleGageSpeed = 1f;

	// Token: 0x04001376 RID: 4982
	public float maleGageSpeed = 1f;

	// Token: 0x04001377 RID: 4983
	public float highSpeed = 2f;

	// Token: 0x04001378 RID: 4984
	public float hitSpeedRate = 2f;

	// Token: 0x04001379 RID: 4985
	public Slider femaleGage;

	// Token: 0x0400137A RID: 4986
	public Toggle femaleGageLock;

	// Token: 0x0400137B RID: 4987
	public Slider maleGage;

	// Token: 0x0400137C RID: 4988
	public Toggle maleGageLock;

	// Token: 0x0400137D RID: 4989
	public Button buttonInEja;

	// Token: 0x0400137E RID: 4990
	public Button buttonOutEja;

	// Token: 0x0400137F RID: 4991
	public Button buttonXTC_F;

	// Token: 0x04001380 RID: 4992
	public Button buttonXTC_W;

	// Token: 0x04001381 RID: 4993
	public Button buttonExtract;

	// Token: 0x04001382 RID: 4994
	public Button buttonVomit;

	// Token: 0x04001383 RID: 4995
	public Button buttonDrink;

	// Token: 0x04001384 RID: 4996
	public GameObject padRoot;

	// Token: 0x04001385 RID: 4997
	public Button talkButton;

	// Token: 0x04001386 RID: 4998
	public H_SE se;

	// Token: 0x04001387 RID: 4999
	private float femaleXTCEnableVal = 0.6666667f;

	// Token: 0x04001388 RID: 5000
	public List<H_Members> members = new List<H_Members>();

	// Token: 0x04001389 RID: 5001
	public H_Visitor visitor;

	// Token: 0x0400138A RID: 5002
	[SerializeField]
	private Canvas uiCanvas;

	// Token: 0x0400138B RID: 5003
	[SerializeField]
	private Canvas middleLeftCanvas;

	// Token: 0x0400138C RID: 5004
	[SerializeField]
	private HStyleChangeUI styleChangeUI;

	// Token: 0x0400138D RID: 5005
	[SerializeField]
	private HWearAcceChangeUI wearAcceChangeUI;

	// Token: 0x0400138E RID: 5006
	[SerializeField]
	private HMaleShowChangeUIManager maleShowChangeUI;

	// Token: 0x0400138F RID: 5007
	[SerializeField]
	private Config configOriginal;

	// Token: 0x04001390 RID: 5008
	private Config config;

	// Token: 0x04001391 RID: 5009
	[SerializeField]
	private PauseMenue pauseMenueOriginal;

	// Token: 0x04001392 RID: 5010
	private PauseMenue pauseMenue;

	// Token: 0x04001393 RID: 5011
	[SerializeField]
	private LightController light;

	// Token: 0x04001394 RID: 5012
	[SerializeField]
	private H_Light h_light;

	// Token: 0x04001395 RID: 5013
	[SerializeField]
	private H_CharaMoveController charaMove;

	// Token: 0x04001396 RID: 5014
	[SerializeField]
	private GameObject badgeFeelVagina;

	// Token: 0x04001397 RID: 5015
	[SerializeField]
	private GameObject badgeFeelAnus;

	// Token: 0x04001398 RID: 5016
	[SerializeField]
	private GameObject badgeIndecentLanguage;

	// Token: 0x04001399 RID: 5017
	[SerializeField]
	private GameObject badgeLikeFeratio;

	// Token: 0x0400139A RID: 5018
	[SerializeField]
	private GameObject badgeLikeSperm;

	// Token: 0x0400139B RID: 5019
	[SerializeField]
	private Button buttonExit;

	// Token: 0x0400139D RID: 5021
	private H_Voice voice;

	// Token: 0x0400139E RID: 5022
	private H_Expression expression;

	// Token: 0x0400139F RID: 5023
	private H_Expression_Male expression_M;

	// Token: 0x040013A0 RID: 5024
	private H_VisitorVoice visitorVoice;

	// Token: 0x040013A1 RID: 5025
	private H_VisitorExpression visitorExpression;

	// Token: 0x040013A2 RID: 5026
	private Dictionary<string, H_StyleData> styleDatas = new Dictionary<string, H_StyleData>();

	// Token: 0x040013A3 RID: 5027
	private Dictionary<string, H_PoseData> poseDatas = new Dictionary<string, H_PoseData>();

	// Token: 0x040013A4 RID: 5028
	private Dictionary<string, H_PoseData> visitorDatas = new Dictionary<string, H_PoseData>();

	// Token: 0x040013A5 RID: 5029
	private int mainMembersNo = -1;

	// Token: 0x040013A6 RID: 5030
	private IllusionCamera camera;

	// Token: 0x040013A7 RID: 5031
	private IllusionCameraResetData cameraReset;

	// Token: 0x040013A8 RID: 5032
	private AssetBundleController[] voiceABC = new AssetBundleController[4];

	// Token: 0x040013AB RID: 5035
	[SerializeField]
	private EditMode editModeOriginal;

	// Token: 0x040013AC RID: 5036
	private EditMode editMode;

	// Token: 0x040013AD RID: 5037
	private H_Scene.EDIT_CHARA editChara;

	// Token: 0x040013AE RID: 5038
	[SerializeField]
	private Transform moveableRoot;

	// Token: 0x040013AF RID: 5039
	[SerializeField]
	private MoveableColorCustomUI colorUI;

	// Token: 0x040013B0 RID: 5040
	[SerializeField]
	private Canvas hEditModeEndCanvas;

	// Token: 0x040013B1 RID: 5041
	[SerializeField]
	private ToggleButton editToggleButton;

	// Token: 0x040013B2 RID: 5042
	[SerializeField]
	private Button editFemale;

	// Token: 0x040013B3 RID: 5043
	[SerializeField]
	private Button editMale;

	// Token: 0x040013B4 RID: 5044
	[SerializeField]
	private Button editVisitor;

	// Token: 0x040013B5 RID: 5045
	[SerializeField]
	private Button editMaleMobA;

	// Token: 0x040013B6 RID: 5046
	[SerializeField]
	private Button editMaleMobB;

	// Token: 0x040013B7 RID: 5047
	[SerializeField]
	private Button editMaleMobC;

	// Token: 0x040013B8 RID: 5048
	[SerializeField]
	private ToggleButton mapToggleButton;

	// Token: 0x040013B9 RID: 5049
	[SerializeField]
	private ToggleButton moveToggleButton;

	// Token: 0x040013BA RID: 5050
	[SerializeField]
	private Animator mapIK_Original;

	// Token: 0x040013BB RID: 5051
	private Dictionary<string, IllusionCameraResetData> cameraDatas = new Dictionary<string, IllusionCameraResetData>();

	// Token: 0x040013BC RID: 5052
	[SerializeField]
	private GameObject swapUIRoot;

	// Token: 0x040013BD RID: 5053
	[SerializeField]
	private Button swapButton;

	// Token: 0x040013BE RID: 5054
	[SerializeField]
	private Text mainFemaleName;

	// Token: 0x040013BF RID: 5055
	[SerializeField]
	private H_GagUI gagUI;

	// Token: 0x040013C0 RID: 5056
	[SerializeField]
	private GameObject weaknessShowUI;

	// Token: 0x040013C1 RID: 5057
	[SerializeField]
	private Button weaknessRecoveryButton;

	// Token: 0x020002BB RID: 699
	private enum EDIT_CHARA
	{
		// Token: 0x040013C5 RID: 5061
		NONE,
		// Token: 0x040013C6 RID: 5062
		FEMALE,
		// Token: 0x040013C7 RID: 5063
		MALE,
		// Token: 0x040013C8 RID: 5064
		VISITOR,
		// Token: 0x040013C9 RID: 5065
		MOB_A,
		// Token: 0x040013CA RID: 5066
		MOB_B,
		// Token: 0x040013CB RID: 5067
		MOB_C
	}
}
